package com.lly.songhigh.eventbus;

import com.lly.songhigh.entity.MusicInfo;

import java.util.List;

/**
 * Created by 李新伟 on 15/10/28.
 */
public class MyEvent {
    /**
     * 播放歌曲
     */
    public static class MediaPlay {
        int what;

        public MediaPlay(int what) {
            this.what = what;
        }

        public int getWhat() {
            return what;
        }
    }

    /**
     * 上一曲, 下一曲控制
     */
    public static class PlayControl {
        int what;

        public PlayControl(int what) {
            this.what = what;
        }

        public int getWhat() {
            return what;
        }
    }

    /**
     * 传递歌曲列表及当前点击行的歌名
     */
    public static class DeliverData {
        List<MusicInfo> musicInfos;
        String songName;

        public DeliverData(List<MusicInfo> musicInfos, String songName) {
            this.musicInfos = musicInfos;
            this.songName = songName;
        }

        public List<MusicInfo> getMusicInfos() {
            return musicInfos;
        }

        public String getSongName() {
            return songName;
        }
    }

    /**
     * 改变循环模式
     */
    public static class RecycleMode {
        int playMode;

        public RecycleMode(int playMode) {
            this.playMode = playMode;
        }

        public int getPlayMode() {
            return playMode;
        }
    }

    /**
     * 改变播放按钮
     */
    public static class ChangeIcon {
        int i;

        public ChangeIcon(int i) {
            this.i = i;
        }

        public int getI() {
            return i;
        }
    }

    /**
     * 点击音乐播放列表播放歌曲
     */
    public static class PlayMusicList {
        int position;

        public PlayMusicList(int position) {
            this.position = position;
        }

        public int getPosition() {
            return position;
        }
    }

    /**
     * 获取下载文件名
     */
    public static class GetFileName {
        String fileName;

        public GetFileName(String fileName) {
            this.fileName = fileName;
        }

        public String getFileName() {
            return fileName;
        }
    }

    /**
     * 通知服务打开界面
     */
    public static class OpenMusic {
        boolean isOpen;

        public OpenMusic(boolean isOpen) {
            this.isOpen = isOpen;
        }

        public boolean isOpen() {
            return isOpen;
        }
    }

    /**
     * 服务通知activity改变UI
     */
    public static class RefreshUI {
        boolean isPlaying;

        public RefreshUI(boolean isPlaying) {
            this.isPlaying = isPlaying;
        }

        public boolean isPlaying() {
            return isPlaying;
        }
    }

    /**
     * 下载任务的网址及标识
     */
    public static class GetData {
        String url;
        int notifyId;

        public GetData(int notifyId, String url) {
            this.notifyId = notifyId;
            this.url = url;
        }

        public int getNotifyId() {
            return notifyId;
        }

        public String getUrl() {
            return url;
        }
    }

    /**
     * 歌词数量
     */
    public static class GetLrcCount {
        int count;

        public GetLrcCount(int count) {
            this.count = count;
        }

        public int getCount() {
            return count;
        }
    }

    /**
     * 下载服务开启
     */
    public static class IsDlding {
        boolean isDownloading;

        public IsDlding(boolean isDownloading) {
            this.isDownloading = isDownloading;
        }

        public boolean isDownloading() {
            return isDownloading;
        }
    }

    /**
     * 下载所需参数
     */
    public static class DldMessage{
        String fileName;
        String url;

        public DldMessage(String fileName, String url) {
            this.fileName = fileName;
            this.url = url;
        }

        public String getFileName() {
            return fileName;
        }


        public String getUrl() {
            return url;
        }
    }

    // 清楚通知栏
    public static class CleanNotification {
        boolean isClean;

        public CleanNotification(boolean isClean) {
            this.isClean = isClean;
        }

        public boolean isClean() {
            return isClean;
        }
    }

}
